Options

Home

Books

E-Books

iPhone Apps

Authors

Reviews

Shopping

Contact us

Picture Gallery

Tracks

 

Create JSON (JavaScript Object Notation) files

To create the JSON files, start with Apple Numbers, Microsoft Excel or a similar program and create a table of values;

Field names are important. For rain gauges they are:

gaugeName, gaugeLatitude, gaugeLongitude, gaugeElevation

For water wells they are:

wellName, wellLatitude, wellLongitude, wellElevation, wellDepth

Remember that Southern latitudes are preceeded by a "-" sign as are longitudes West of the Prime Meridian.

Elevations and depths can be in whatever units you choose, feet or metres, provided that consistency is maintained.

The product should look like this:

well table

From this table, export the data to a CSV (Comma Separated Value) file.

 

Then use a CSV to JSON converter program to create the JSON file, we use www.convertcsv.com. Open the CSV file in a text editor and copy and paste the data into the appropriate field in the converter app.

Screen Shot 2017-10-02 at 4

It is important to highlight the field, "First row is column names"

Then create the JSON file and download it to your computer

 

Rename the JSON file to either wellData.json or gaugeData.json

The final product viewed with a Text Editor will look like this:

Using iTunes File Sharing, the gaugeData.json and wellData.json files can be moved into the app.